<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>运算符</title>
</head>
<body>

<script>
    /*==和===的区别*/
    let str = "123"  //字符串
    let num = 123    //数字类型
    let str2 = "123.0"

    console.log(str == num) //true
    console.log(str === num) //false


    console.log(str == str2) //false  如果str2是“123.0” 结果就是false   如果str2是 123.0  结果就是true
    console.log(str === str2) //false


    console.log("---------------------------------------------------")

    console.log(typeof str)  //string
    console.log(typeof  num) //number

    let a = true;
    let b = 3.14;
    let c = new Array();

    console.log(typeof a)  //boolean
    console.log(typeof b)  //number
    console.log(typeof c)  //object

    console.log(typeof 123) //number
    console.log(typeof 123+"abc") //numberabc
    console.log(typeof (123+"abc")) //string

    console.log("===============================================================")
    /*delete 用来删除数组中的元素或者删除对象的属性或方法*/
    let arr = [12,"aaa",true,"bbb"]

    console.log("删除前："+arr) //12,aaa,true,bbb

    delete arr[1]

    console.log("删除后："+arr) //12,true,bbb

</script>
</body>
</html>